﻿<html>
<head runat="server">
    <title>Index</title>
    <link rel="stylesheet" type="text/css" href="/uploadify/uploadify.css" />
    <script src="/Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="/uploadify/jquery.uploadify.v2.1.4.js" type="text/javascript"></script>
    <script src="/uploadify/jquery.uploadify.v2.1.4.min.js" type="text/javascript"></script>
    <script src="/uploadify/swfobject.js" type="text/javascript"></script>
    <script src="/Scripts/ajax-RoomType.js" type="text/javascript"></script>

    <script type="text/javascript">
       $(document).ready(function() {
       $('#fileInput').uploadify({
           'uploader': '@Url.Content("~/Uploadify/uploadify.swf")',
           'cancelImg': '@Url.Content("~/Uploadify/cancel.png")',
           'buttonText': 'Upload File',
           'script': '@Url.Action("Upload", "Manager")',
           'auto': false,
           'multi': false,
           'fileDesc': 'Image Files',
           'fileExt': '*.jpg;*.png;*.gif;*.bmp;*.jpeg',
           'queueSizeLimit': 90,
           'sizeLimit': 4000000,
           'buttonText': 'Choose Image',
           'folder': '@Url.Content("~/Images")',
           'onAllComplete': function (event, queueID, fileObj, response, data) {
               alert('finished');
           }
           //Write whatever you want here. It fires when upload is complete!
       
       });

   });
</script>
</head>
<body>
    <link rel="stylesheet" href="~/Content/admin/adminMenu.css" />
    <link rel="stylesheet" href="~/Content/manager/roomClassStyle.css" />

    <div class="navbox">
    <ul class="nav">
        <li><a href="ShowRoomClass">Quản lý hạng phòng</a></li>
        <li><a href="ShowRoomType">Quản lý loại phòng</a></li>
        <li><a href="ShowRoom">Quản lý phòng</a></li>
        <li><a href="ShowPrice">Quản lý giá</a></li>
    </ul>
</div>
    <div id="main">
        <div class="tittle">
            <p class="gkHeadline">Quản lý loại phòng</p>
            <p class="gkSubHeadline" style="margin-top:-4px;margin-bottom:7px">Caravelle Hotel</p>
        </div>
       @foreach (var l in ViewData.Model.LoaiPhongs)
       { 
           <form action="Update_RoomType">
                 <a id = '@l.maLoai' class="showInfor_RoomType">@l.tenLoai</a>
                 <div class = 'hidden classBox' id="info_@l.maLoai">
                         <label class='blockA'>Mã loại </label>
                         <input class='blockB' type='text' id='maLoai_@l.maLoai' name='maLoai' disabled = 'disabled' value = '@l.maLoai'/><br>
                         <label class='blockA'>Tên loại </label>
                         <input class='blockB' type='text' id='tenLoai_@l.maLoai' name='tenLoai' value = '@l.tenLoai'/><br>
                         <label class='moTa'>Mô tả </label>
                         <textarea rows='4' cols='50' class='blockB' id='moTa_@l.maLoai' name='moTa'>@l.moTa</textarea><br>
                         <label class=''>Ở tối đa </label>
                         <input class='blockB' type='text' id='soLuong_@l.maLoai' name='soLuong' value = '@l.soLuong'/><br>
                         <label class='labImg'>Hình ảnh </label>
                         <img  class='imgClass' id='img_@l.maLoai' src='/Images/@l.img_name' style='height: 200px; width:300px;border-radius:7px;box-shadow: 1px 1px 5px #494444;' /><br>
                         <input type ="hidden" name="id" value="@l.maLoai" class="maLoai"/>
                     <div id="notice_@l.maLoai" class="notice"></div>
                     <a id="_@l.maLoai" class="update btnInner"><img src="~/Images/icon/24_edit.png" /></a>
                     <a id="=@l.maLoai" class="delete btnInner"><img src="~/Images/icon/24_trash.png" /></a>
                 </div>
               </form>
          
         }
    </div>
    <div>
        <a id="btn_add_room" class="btn" style="margin-top:7px">+</a>
        <div class = 'hidden_new classBox' id="info_new">
            <label class='blockA'>Tên loại </label>
            <input class='blockB' type='text' id='tenLoai_new' name='tenLoai' /><br>
            <label class='blockA'>Mô tả </label>
            <textarea rows='4' cols='50' class='blockB' id='moTa_new' name='moTa'></textarea><br>
            <label class='blockA'>Ở tối đa </label>
            <input class='blockB' type='text' id='soLuong_new' name='soLuong' /><br>
            <label class='labUpload'>Hình ảnh </label>
            <input id="fileInput" name="fileInput" type="file"> 
            <div id="notice_new" class="notice"></div>
            <a id="btn_add" class="add btnInner"><img src="~/Images/icon/24_upload.png" /></a>
        </div>
    </div>
    <div class="clear"></div>
    <!--<input id="beginupload" name="beginupload" type="button" onclick="javascript: $('#fileInput').uploadifyUpload();" /> -->
    
</body>
</html>